package com.upcode.weighing.enums;

public enum HttpStatusEnum {

    OK(200, "请求成功"),
    BAD_REQUEST(400, "请求出错"),
    ACCEPT_NOT_PROCESS(202, "已经接受请求，但未处理完成"),
    UNAUTHORIZED(401, "没有登录"),

    UNSELECTED_LOGIN_COMPANY(402, "请先选择登录企业，然后再进行业务操作！"),

    FORBIDDEN(403, "没有权限"),
    NOT_FOUND(404, "找不到页面"),
    INTERNAL_SERVER_ERROR(500, "服务器出错"),
    LOGIN_FAIL(1001,"登录失败/异常！"),
    TOKEN_PARSER_FAIL(1002,"令牌解析异常！"),
    VALIDATED_FAIL(1004,"数据验证失败！"),

    NSOP_DATA_NULL(501, "没有查询到数据"),
    NSOP_SAVE_FAIL(502, "保存数据失败"),
    NSOP_DEL_FAIL(503, "删除数据失败"),


    //验证码错误
    CAPTCHA_ERROR(602,"验证码输入错误！");


    private final int value;

    private final String msg;

    HttpStatusEnum(int value, String msg) {
        this.value = value;
        this.msg = msg;
    }

    public int value() {
        return value;
    }

    public String msg() {
        return msg;
    }

}
